Removing Counter Names and Descriptions from the Registry

If you need to remove counter names and descriptions from the registry, use the unlodctr utility. This removes the registry entries made by lodctr.

Using unlodctr

The command-line syntax for unlodctr is:

unlodctr ApplicationName

The unlodctr utility looks up the First Counter and Last Counter values in the application s Performance key to determine the indexes of the counter objects to remove. Using these indexes, it makes the following changes to the Perflib key.

HKEY_LOCAL_MACHINE

    \SOFTWARE

        \Microsoft

            \Windows NT

                \CurrentVersion

                    \Perflib

                        Last Counter = updated if changed

                        Last Help = updated if changed

                        \009

                            Counter = application text removed

                            Help    = application text removed

                        \supported language, other than U.S. English

                            Counter = application text removed

                            Help    = application text removed

 

The unlodctr utility also removes the First Counter, First Help, Last Counter, and Last Help values from the application s Performance key.

 

Note  The unloading function of UNLODCTR, UnloadPerfCounterTextStrings, is declared in LOADPERF.H and exported from LOADPERF.DLL. This allows you to call this function directly from your uninstall program. For example

UnloadPerfCounterTextStrings (ApplicationName, bQuietModeArg);

where ApplicationName is the name of your application and bQuietModeArg is a Boolean parameter that indicates whether to display output during the unloading of the counter text strings.